home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20000824-20010305
/
000209_news@columbia.edu _Fri Jan 12 14:43:10 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
8KB
Return-Path: <news@columbia.edu>
Received: from watsun.cc.columbia.edu (watsun.cc.columbia.edu [128.59.39.2])
by uhaligani.cc.columbia.edu (8.9.3/8.9.3) with ESMTP id OAA11335
for <kermit.misc@cpunix.cc.columbia.edu>; Fri, 12 Jan 2001 14:43:10 -0500 (EST)
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.59.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA07878
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 12 Jan 2001 14:43:10 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.9.3/8.9.3) id OAA27705
for kermit.misc@watsun.cc.columbia.edu; Fri, 12 Jan 2001 14:22:40 -0500 (EST)
X-Authentication-Warning: newsmaster.cc.columbia.edu: news set sender to <news> using -f
Message-ID: <3A5F590E.21B5448A@cyberbills.com>
From: Victor Zele <victor@cyberbills.com>
Organization: CyberBills, Inc.
Subject: Re: scripting problem
Date: Fri, 12 Jan 2001 19:20:46 GMT
To: kermit.misc@columbia.edu
Frank da Cruz wrote:
> In article <3A5DF487.D5E07811@cyberbills.com>,
> Victor Zele <victor@cyberbills.com> wrote:
> : I do a set protocol zmodem at the beginning because that's the
> : protocol supported by the remote server.
> :
> You didn't mention that in your original report.
>
> Zmodem is an external protocol in C-Kermit, meaning (a) you need to have
> an external Zmodem program, and (b) the Zmodem program must operate on
> standard i/o, so Kermit can redirect it over the communications connection.
>
> In any case, Kermit seems to be doing its job. The following:
>
> Retry 0: Timeout on pathname
>
> is a message from the Zmodem program (sz or whatever). So either sz is
> not allowing itself to be redirected (in which case you need another
> Zmodem program, such crzsz), or else there is an error in your script,
> but you didn't show us your script.
>
> - Frank
Well I tried installing crzsz and these Zmodem programs behave
the same as the standard rzsz programs. Besides why does the same
commands work when I run them interactively in Kermit? I do know
that I am sending data at 8N1, but the compuserve number requires
7-bit terminal emulation that is default in Kermit. I think it must be
related to the script not having the exact terminal characteristics as an
interactive session that is doing some additional handshaking between
7-bit Compuserv and the 8-bit server at the end.
Below is the script output and the same commands when running interactively
and things working. I have verbose output for the sz and csz programs.
Script output running SZ
===================================================
Making outbound connection...CONNECTED
The current File Transfer Protocol is ZMODEM
sz 0.12.20
mode:1
Countem: 000 /root/bin/filestr.txt 54
countem: Total 1 54
zshhdr: ZRQINIT 0zshhdr: ZRQINIT 0Retry 0: Timeout on pathname
getnak failed
mode:0
Transfer incomplete
Now the interactive script commands output that works
===================================================
C-Kermit 7.0.196, 1 Jan 2000, for Linux
Copyright (C) 1985, 2000,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/root/bin/) C-Kermit>conn
The current File Transfer Protocol is ZMODEM.
(Back at sjp-gw1)
----------------------------------------------------
(/root/bin/) C-Kermit>redirect sz -vvv /root/bin/\%f
sz 0.12.20
mode:1
Countem: 000 /root/bin/filestr.txt 54
countem: Total 1 54
zshhdr: ZRQINIT 0zgethdr: ZRINIT 2f000000Rxbuflen=0 Tframlen=0
mode:2
Rxbuflen=1024
Rxbuflen=1024 blklen=1024
Txwindow = 0 Txwspac = 0
Sending: filestr.txt
zsbhdr: ZFILE 0zsdat32: 41 ZCRCWzgethdr: ZRPOS 0zsbhdr: ZDATA 0zsdat32: 54 ZCRCEBytes
Sent: 54 BPS:9
zshhdr: ZFIN 0zgethdr: ZFIN 0mode:0
Transfer complete
----------------------------------------------------------------
USING CSZ script output with failed transfer
The current File Transfer Protocol is ZMODEM
csz 1.03 10-01-99 for POSIX tty=(null)
mode:3
Baudrate = 4097
Countem: 000 filestr.txt 54
countem: Total 1 54
zshhdr: f 4 ZRQINIT 80
wcsend: argc=1
Sending name=filestr.txt
wctxpn: filestr.txt
Retry 0: Awaiting pathname nak for filestr.txt
Readline:TIMEOUT
Timeout waiting for ZRINIT
csz 1.03 10-01-99 finished.
mode:0
=======================================
GOOD transfer running script command interactively w/ CSZ
(/root/bin/) C-Kermit>redirect /usr/bin/csz -vvv \%f
csz 1.03 10-01-99 for POSIX tty=(null)
mode:3
Baudrate = 4097
Countem: 000 filestr.txt 54
countem: Total 1 54
zshhdr: f 4 ZRQINIT 80
wcsend: argc=1
Sending name=filestr.txt
wctxpn: filestr.txt
Retry 0: Awaiting pathname nak for filestr.txt
zgethdr: B 4 ZRINIT 2f000000
Rxbuflen=0 Tframlen=0
Rxbuflen=0
Rxbuflen=0 blklen=1024
Txwindow = 0 Txwspac = 0
wctxpn: 54 7227452623 100644 3 1 54
zsbhdr: f 4 ZFILE 0
zsdata: 41 ZCRCW
zgethdr: B 4 ZRPOS 0
fooseek: pos =0 vpos=0 Canseek=1
within buffer: vpos=0
zsbhdr: f 4 ZDATA 0
zfilbuf: bytcnt =0 vpos=0 blklen=1024
zfilbuf: n=54 vpos=54 Eofseen=1
0 ZMODEM CRC-32
zsdata: 54 ZCRCE
zsbhdr: f 4 ZEOF 36
zgethdr: B 4 ZRINIT 2f000000
zshhdr: f 4 ZFIN 0
zgethdr: B 4 ZFIN 0
csz 1.03 10-01-99 finished.
mode:0
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
my script is (with user/passwords replaced):
#!/usr/bin/kermit +
#
# Script for dialing to transfer via Zmodem protocol
#
# Initialize settings
set modem type usrobotics
set line /dev/ttyS1
set protocol zmodem
set speed 57600
set flow rts/cts
set dial retries 5
# Compuserv local number: 408-268-0799
#assign \%n 268-0799 ; Compuserv number - San Jose
assign \%n 354-9573 ; Compuserv number - Santa Clara
assign \%h HOSTNAME ; HostID
assign \%p PASSWORD\13 ; password
assign \%f filestr.out
#------------------------------------------------------------------
# Do not edit from here
#
#eightbit
cd /root/bin
.\%d := \v(ndate)-\fsubstr(\v(time),1,2)\fsubstr(\v(time),4,2)
define giveup { hangup, close, exit 1 {FATAL: \%1 (Connection closed)} }
assign \%u PRODUSER ; Receive Production UserID
# Connect to dialup server
dial \%n
if fail exit 1
for \%i 1 6 1 { ; Try up to 6 times to get Host Name prompt
output \13 ; Send a carriage return and try again
input 10 Name: ; Wait 10 sec for it to appear
# input 10 : ; Wait 10 sec for it to appear
if success break ; Got it - proceed...
}
pause 1
if ( > \%i 6 ) exit 1 NO HOST PROMPT
lineout \%h ; Send Host string
input 30 logon id: ; Wait for Login id: prompt
if fail stop 1 NO LOGON PROMPT
lineout \%u ; Send the Userid.
input 10 password: ; Wait for Login id: prompt
if fail stop 1 NO PASSWORD PROMPT
lineout \%p ; Send the password.
# Wait for connection
input 20 CONNECTED
input 20 ZMODEM
pause 4
# Perform SEND operation
redirect /usr/bin/csz -vvv \%f
#redirect /usr/bin/sz -vvv \%f
#send \%f
#resend /pathnames:off \%f
if fail stop ; Update failed
exit
+++++++++++++++++++++++++++++++++++++++++++++++++++
Here is the comm settings which appear the same for both interactive
sessions and script sessions.
(/root/bin/) C-Kermit>sh comm
Communications Parameters:
Line: /dev/ttyS1, speed: unknown, mode: local, modem: usrobotics
Parity: none, stop-bits: (default) (8N1)
Duplex: full, flow: rts/cts, handshake: none
Carrier-watch: auto, close-on-disconnect: off
Lockfile: /var/lock/LCK..ttyS1
Terminal bytesize: 7, escape character: 28 (^\)
Modem signals unavailable
Type SHOW DIAL to see DIAL-related items.
Type SHOW MODEM to see modem-related items.
(/root/bin/) C-Kermit>